import { getClient, postClient } from "./requestClient"


// 登录
export const login = async (params) =>
  await postClient("/common/login", params)
// 注册
export const register = async (params) =>
  await postClient("/common/register", params)
// 获取用户信息
export const getUserInfo = async (params) =>
  await getClient("/common/getuserlist", params)
// 商品查询
export const getGoods = async (params) =>
  await getClient("/common/getgoods", params)
// 修改商品
export const modifyGoods = async (params) =>
  await postClient("/common/modifygoods", params)
// 添加购物车
export const addBuyCar = async (params) =>
  await postClient("/common/addbuycar", params)
// 查询购物车
export const getBuyCar = async (params) =>
  await getClient("/common/getbuycar", params)
// 修改购物车
export const modifyBuyCar = async (params) =>
  await postClient("/common/modifybuycar", params)
// 删除购物车
export const delBuyCar = async (params) =>
  await postClient("/common/delbuycar", params)
// 新增订单
export const addOrder = async (params) =>
  await postClient("/common/addorder", params)
// 订单列表
export const getOrder = async (params) =>
  await getClient("/common/getorder", params)
// 新增地址
export const addAddress = async (params) =>
  await postClient("/common/addaddress", params)
// 删除地址
export const delAddress = async (params) =>
  await postClient("/common/deladdress", params)
// 修改地址
export const modifyAddress = async (params) =>
  await postClient("/common/modifyaddress", params)
// 查询地址
export const getAddress = async (params) =>
  await getClient("/common/getaddress", params)
// 订单确认收货
export const orderOver = async (params) =>
  await postClient("/common/modifyorder", params)
